﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SalienceEngineDemo.Manage_Options
{
    public class ListofOptions
    {
        public List<OptionGridInfo> optionsList;
        public List<string> RestartRequiredOptions;

        public ListofOptions()
        {
            optionsList = new List<OptionGridInfo>();
            RestartRequiredOptions = new List<string>();
        }

        public void initialize()
        {
            //** ADD THE OPTIONS THAT REQUIRE A RESTART OF SALIENCE HERE **/
            /* Parameters are as follows
                * 1) Name of the Property for the option
                */
            RestartRequiredOptions.Add("LicensePath");
            RestartRequiredOptions.Add("nMode");
            RestartRequiredOptions.Add("DataDirectory");

            int isFile = 0;
            int isDir = 1;
            int noBrowser = 2;
            // ** START DRAWING THE GRID OPTIONS HERE **/
            /* Parameters are as follows
                *      IF (CATEGORY)
                *          1) Name of the Category as displayed on the GUI
                *      ELSE IF (NOT CATEGORY)
                *          IF (NO USER ENTRY ALLOWED)
                *              IF  (ONLY TRUE OR FALSE)
                *                  1) Name of the Option as displayed on the GUI
                *                  2) The property that you're tying to the option
                *                  3) The name of the property
                *              IF  (OTHER DEFINED VALUES)
                *                  1) Name of the Option as displayed on the GUI
                *                  2) The property that you're tying to the option
                *                  3) The name of the property
                *                      a) Add the names of the different predefined options in the customDrop list
                *         ELSE IF (USER ENTRY ALLOWED)
                *                  1) Name of the Option as displayed on the GUI
                *                  2) Whether this option needs a:
                *                      a) File Browser (isFile)
                *                      b) Directory Browser (isDir)
                *                      c) No Browser (noBrowser)
                *                  3) The property that you're tying to the option
                *                  4) The name of the property
                *  REMEMBER: Property settings should only be set as either 'string's or 'bool's, everything will be converted.
                */
            // Startup Options
            OptionGridInfo info = new OptionGridInfo("Startup Options");
            optionsList.Add(info);
            //info = new OptionGridInfo("License File", isFile, Properties.Settings.Default.LicensePath , "LicensePath");
            //optionsList.Add(info);
            //info = new OptionGridInfo("Content Mode", SalienceDemo.oConfig.defaultSettings.settings["nMode"], "nMode");
            //info.customDrop.Add("Default Mode");
            //info.customDrop.Add("Short Mode");
            //optionsList.Add(info);
            info = new OptionGridInfo("Data Directory", isDir, SalienceDemo.oConfig.activeSettings().settings["DataDirectory"], "DataDirectory");
            optionsList.Add(info);
            // Base Options
            info = new OptionGridInfo("Base Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Text Threshold", noBrowser, SalienceDemo.oConfig.activeSettings().settings["TextThreshold"], "TextThreshold");
            optionsList.Add(info);
            info = new OptionGridInfo("Lists and Tables",SalienceDemo.oConfig.activeSettings().settings["ListsandTables"], "ListsandTables");
            optionsList.Add(info);
            info = new OptionGridInfo("Max Execution Time", noBrowser,SalienceDemo.oConfig.activeSettings().settings["TextTimeout"], "TextTimeout");
            optionsList.Add(info);
            info = new OptionGridInfo("Fail on Long Sentence",SalienceDemo.oConfig.activeSettings().settings["FailLongSentences"], "FailLongSentences");
            optionsList.Add(info);
            info = new OptionGridInfo("Concept Slop", noBrowser,SalienceDemo.oConfig.activeSettings().settings["ConceptSlop"], "ConceptSlop");
            optionsList.Add(info);
            info = new OptionGridInfo("Document Semantics",SalienceDemo.oConfig.activeSettings().settings["DocumentSemantics"], "DocumentSemantics");
            optionsList.Add(info);
            info = new OptionGridInfo("User Directory", isDir, SalienceDemo.oConfig.activeSettings().settings["UserDirectory"], "UserDirectory");
            optionsList.Add(info);
            info = new OptionGridInfo("One Sentence",SalienceDemo.oConfig.activeSettings().settings["OneSentence"], "OneSentence");
            optionsList.Add(info);
            info = new OptionGridInfo("Shared Memory",SalienceDemo.oConfig.activeSettings().settings["SharedMemory"], "SharedMemory");
            optionsList.Add(info);
            info = new OptionGridInfo("Complex Stems",SalienceDemo.oConfig.activeSettings().settings["ComplexStems"], "ComplexStems");
            optionsList.Add(info);
            info = new OptionGridInfo("Flatten All Uppercase", SalienceDemo.oConfig.activeSettings().settings["FlattenAllUppercase"], "FlattenAllUppercase");
            optionsList.Add(info);
            info = new OptionGridInfo("HTML Content", SalienceDemo.oConfig.activeSettings().settings["HTMLContent"], "HTMLContent");
            optionsList.Add(info);
            // Document Options
            info = new OptionGridInfo("Document Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Summary Length", noBrowser,SalienceDemo.oConfig.activeSettings().settings["SummaryLength"], "SummaryLength");
            optionsList.Add(info);
            // Concept Topic Options
            info = new OptionGridInfo("Concept Topic Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Maximum Hits", noBrowser,SalienceDemo.oConfig.activeSettings().settings["MaxConceptHits"], "MaxConceptHits");
            optionsList.Add(info);
            info = new OptionGridInfo("Minimum Score", noBrowser,SalienceDemo.oConfig.activeSettings().settings["MinConceptScore"], "MinConceptScore");
            optionsList.Add(info);
            info = new OptionGridInfo("Window Size", noBrowser,SalienceDemo.oConfig.activeSettings().settings["ConceptTopicWindowSize"], "ConceptTopicWindowSize");
            optionsList.Add(info);
            info = new OptionGridInfo("Window Jump", noBrowser,SalienceDemo.oConfig.activeSettings().settings["ConceptTopicWindowJump"], "ConceptTopicWindowJump");
            optionsList.Add(info);
            info = new OptionGridInfo("Non-Grammatical Topics",SalienceDemo.oConfig.activeSettings().settings["NongrammaticalTopics"], "NongrammaticalTopics");
            optionsList.Add(info);
            info = new OptionGridInfo("Concept Topic List", isFile, SalienceDemo.oConfig.activeSettings().settings["DefaultConceptTopicFile"], "DefaultConceptTopicFile");
            optionsList.Add(info);
            // Entity Options
            info = new OptionGridInfo("Entity Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Required Entities", noBrowser,SalienceDemo.oConfig.activeSettings().settings["RequiredEntities"], "RequiredEntities");
            optionsList.Add(info);
            info = new OptionGridInfo("Anaphora Resolution",SalienceDemo.oConfig.activeSettings().settings["AnaphoraResolution"], "AnaphoraResolution");
            optionsList.Add(info);
            info = new OptionGridInfo("Model Sensitivity", noBrowser,SalienceDemo.oConfig.activeSettings().settings["ModelSensitivity"], "ModelSensitivity");
            optionsList.Add(info);
            info = new OptionGridInfo("Entity Threshold", noBrowser,SalienceDemo.oConfig.activeSettings().settings["EntityThreshold"], "EntityThreshold");
            optionsList.Add(info);
            info = new OptionGridInfo("Entity Summary Length", noBrowser,SalienceDemo.oConfig.activeSettings().settings["EntitySummaryLength"], "EntitySummaryLength");
            optionsList.Add(info);
            info = new OptionGridInfo("Entity Overlap",SalienceDemo.oConfig.activeSettings().settings["EntityOverlap"], "EntityOverlap");
            optionsList.Add(info);
            info = new OptionGridInfo("User Entity List", isFile,SalienceDemo.oConfig.activeSettings().settings["UserEntityList"], "UserEntityList");
            optionsList.Add(info);
            info = new OptionGridInfo("Overlap Sentiment Themes",SalienceDemo.oConfig.activeSettings().settings["OverlapSentimentThemes"], "OverlapSentimentThemes");
            optionsList.Add(info);
            info = new OptionGridInfo("Entity Topics",SalienceDemo.oConfig.activeSettings().settings["EntityTopics"], "EntityTopics");
            optionsList.Add(info);
            // Sentiment Options
            info = new OptionGridInfo("Sentiment Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Set Sentiment Dictionary", noBrowser, SalienceDemo.oConfig.activeSettings().settings["DefaultHSDFile"], "DefaultHSDFile");
            optionsList.Add(info);
            //info = new OptionGridInfo("Add Sentiment Dictionary", isFile,SalienceDemo.oConfig.activeSettings().settings["AddSentimentDictionary"], "AddSentimentDictionary");
            //optionsList.Add(info);
            info = new OptionGridInfo("Polarity Model",SalienceDemo.oConfig.activeSettings().settings["UsePolarityModel"], "UsePolarityModel");
            optionsList.Add(info);
            info = new OptionGridInfo("Show All Possible Phrases", SalienceDemo.oConfig.activeSettings().settings["ReturnAllPossibleSentiment"], "ReturnAllPossibleSentiment");
            optionsList.Add(info);
            info = new OptionGridInfo("Emphatic Multiplier", noBrowser, SalienceDemo.oConfig.activeSettings().settings["EmphaticMultiplier"], "EmphaticMultiplier");
            optionsList.Add(info);
            info = new OptionGridInfo("Superlative Multiplier", noBrowser, SalienceDemo.oConfig.activeSettings().settings["SuperlativeMultiplier"], "SuperlativeMultiplier");
            optionsList.Add(info);
            // Query Topic Options
            info = new OptionGridInfo("Query Topic Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Topic Stemming",SalienceDemo.oConfig.activeSettings().settings["TopicStemming"], "TopicStemming");
            optionsList.Add(info);
            info = new OptionGridInfo("Query Topic List", isFile, SalienceDemo.oConfig.activeSettings().settings["DefaultQueryTopicFile"], "DefaultQueryTopicFile");
            optionsList.Add(info);
            // Theme Options
            info = new OptionGridInfo("Theme Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Theme Topics",SalienceDemo.oConfig.activeSettings().settings["ThemeTopics"], "ThemeTopics");
            optionsList.Add(info);
            //Category Options
            info = new OptionGridInfo("Category Options");
            optionsList.Add(info);
            info = new OptionGridInfo("Explain Categories", SalienceDemo.oConfig.activeSettings().settings["ExplainCategories"], "ExplainCategories");
            optionsList.Add(info);
        }
    }
}
